package com.kob.design.singleton.lazy;

/**
 * @Description: 懒汉式 ，静态内部类
 * @Author: fyt
 * @Date: 2024/4/15 19:20
 **/
public class Singleton4 {
    private Singleton4() {
    }
    private static Singleton4 instance;

    private static class SingletonHolder{
        private static Singleton4 INSTANCE = new Singleton4();
    }
    public static Singleton4 getInstance() {

        return SingletonHolder.INSTANCE;
    }
}
